class Circle extends Shape {
    constructor(centerX, centerY, radius) {
        super();
        this.x = centerX;
        this.y = centerY;
        this.radius = radius;
        this.startAngle = 0;
        this.endAngle = Math.PI * 2;
    }
    draw(ctx) {
        super.begin(ctx);
        ctx.arc(this.x, this.y, this.radius, this.startAngle, this.endAngle);
        super.end(ctx);
    }
    containsPoint(ctx, x, y) {
        let dx = x - this.x;
        let dy = y - this.y;
        let dist = Math.hypot(dx, dy);
        return dist <= this.radius;
    }
}